package com.mondo.financialwallet.presentation.model;

import java.io.Serializable;
import java.text.DecimalFormat;

/**
 * 持有产品
 */
public class HoldProduct implements Serializable {

    private String orderNumber;
    private String name;
    private String holdAmount;
    private String minimumDay;
    private String cumulativeIncome;

    public HoldProduct(String orderNumber, String name, String holdAmount, String minimumDay, String cumulativeIncome) {
        this.name = name;
        this.orderNumber = orderNumber;
        this.holdAmount = holdAmount;
        this.minimumDay = minimumDay;
        this.cumulativeIncome = cumulativeIncome;
    }

    public String getName() {
        return name;
    }

    public String getHoldAmount() {
        return new DecimalFormat("########.####")
                .format(Double.parseDouble(holdAmount));
    }

    public String getMinimumDay() {
        return minimumDay;
    }

    public String getCumulativeIncome() {
        return new DecimalFormat("########.####") .format(Double.parseDouble(cumulativeIncome));
    }

    public String getOrderNumber() {
        return orderNumber;
    }
}
